package com.itzyf.pokemondata.bean;

import com.avos.avoscloud.AVObject;

import org.litepal.crud.LitePalSupport;

import java.util.Date;

/**
 * @author 依风听雨
 * @version 创建时间：2019/06/03 17:48
 */
public class DbPropDo extends LitePalSupport {
    private Date updatedAt;
    private String objectId;
    private Date createdAt;
    private long id;
    private String detail;

    private String effect;
    private String cname;
    private String icon;

    public DbPropDo() {
    }

    public DbPropDo(PropJsonDo jsonDo) {
        objectId = jsonDo.getObjectId();
        updatedAt = jsonDo.getUpdatedAt();
        createdAt = jsonDo.getCreatedAt();
        effect = jsonDo.getEffect();
        cname = jsonDo.getCname();
        icon = jsonDo.getIcon();
        detail = jsonDo.getDetail();
    }

    public DbPropDo(AVObject jsonDo) {
        objectId = jsonDo.getObjectId();
        updatedAt = jsonDo.getUpdatedAt();
        createdAt = jsonDo.getCreatedAt();
        effect = jsonDo.getString("effect");
        cname = jsonDo.getString("cname");
        icon = jsonDo.getString("icon");
        detail = jsonDo.getString("detail");
    }

    public Date getUpdatedAt() {
        return updatedAt;
    }

    public void setUpdatedAt(Date updatedAt) {
        this.updatedAt = updatedAt;
    }

    public String getObjectId() {
        return objectId == null ? "" : objectId;
    }

    public void setObjectId(String objectId) {
        this.objectId = objectId;
    }

    public Date getCreatedAt() {
        return createdAt;
    }

    public void setCreatedAt(Date createdAt) {
        this.createdAt = createdAt;
    }

    public long getId() {
        return id;
    }

    public void setId(long id) {
        this.id = id;
    }

    public String getEffect() {
        return effect == null ? "" : effect;
    }

    public void setEffect(String effect) {
        this.effect = effect;
    }

    public String getCname() {
        return cname == null ? "" : cname;
    }

    public void setCname(String cname) {
        this.cname = cname;
    }

    public String getIcon() {
        return icon == null ? "" : icon;
    }

    public void setIcon(String icon) {
        this.icon = icon;
    }

    public String getDetail() {
        return detail;
    }

    public void setDetail(String detail) {
        this.detail = detail;
    }
}
